package com.ag.work.action;

import org.apache.log4j.Logger;

import com.ag.common.BaseAction;
import com.ag.work.service.impl.EventPlanServiceImpl;

public class CheckStartPlanAction extends BaseAction {
	private static final Logger logger = Logger
			.getLogger(CheckStartPlanAction.class);
	private EventPlanServiceImpl eventPlanServiceImpl;
	private String EId;
	private String ajaxRst = "0";
	int total;

	public String findPStatusByEId() {

		logger.info("findPStatus:start------");
		try {
			total = ((Long) this.eventPlanServiceImpl.findPStatusByEId(EId)
					.iterator().next()).intValue();
		} catch (Exception e) {
			e.printStackTrace();
		}
		if (total != 0) {
			this.ajaxRst = "1";
		} else {
			this.ajaxRst = "0";
		}
		// this.ajaxRst="1";
		return "findPStatusOK";
	}

	public EventPlanServiceImpl getEventPlanServiceImpl() {
		return eventPlanServiceImpl;
	}

	public void setEventPlanServiceImpl(
			EventPlanServiceImpl eventPlanServiceImpl) {
		this.eventPlanServiceImpl = eventPlanServiceImpl;
	}

	public String getEId() {
		return EId;
	}

	public void setEId(String eId) {
		EId = eId;
	}

	public String getAjaxRst() {
		return ajaxRst;
	}

	public void setAjaxRst(String ajaxRst) {
		this.ajaxRst = ajaxRst;
	}
}
